import request from '@/utils/request'

// 获取商家详情接口
export const getMerchantDetailAPI = (merchantId) => {
  return request({
    url: `/user/merchant/getDetail/${merchantId}`,
    method: 'GET'
  })
}

//获取商家评分接口
export const getMerchantScoreAPI = (userId, merchantId) => {
  return request({
    url: `/user/merchant/rate`,
    method: 'GET',
    data:{
      userId,
      merchantId
    }
  })
}

// 提交商家评分
export const submitMerchantScoreAPI = (merchantId, rating) => {
  return request({
    url: `/user/merchant/rate`,
    method: 'POST',
    data: {
      merchantId,
      rating
    }
  })
}
